﻿using Relocation.Data;
using Relocation.Service;


namespace Relocation.Base
{
	public partial class Session
	{
		/// <summary>
		/// 通过获取map对象MainWindow
		/// </summary>
		public const string KEY_MAIN_WINDOW = "MainWindow";

		/// <summary>
		/// 通过获取map对象MainTreeView
		/// </summary>
		public const string KEY_MAIN_TREE_VIEW = "MainTreeView";

		/// <summary>
		/// 角色名称：管理员
		/// </summary>
		public const string KEY_ROLE_ADMIN = "admin";

		/// <summary>
		/// 操作者
		/// </summary>
		public const string KEY_ROLE_OPERATOR = "operator";

		/// <summary>
		/// 一般用户
		/// </summary>
		public const string KEY_ROLE_GENERAL = "general";



		/// <summary>
		/// 登录的用户信息.
		/// </summary>
		/// <value>当前登录用户</value>
		public User User
		{
			get;
			set;
		}

		/// <summary>
		/// 当前项目.
		/// </summary>
		/// <value>The Project.</value>
		public Project Project
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the data model.
		/// </summary>
		/// <value>The data model.</value>
		public DataModel DataModel
		{
			get;
			set;
		}

		/// <summary>
		/// 是否有数据更新需要去刷新.
		/// </summary>
		public bool DataRefresh
		{
			get;
			set;
		}

		#region ISession 成员

		private System.Collections.Generic.Dictionary<string, object> _Map = new System.Collections.Generic.Dictionary<string, object>();
		public System.Collections.Generic.Dictionary<string, object> Map
		{
			get
			{
				return _Map;
			}
		}

		#endregion

	}
}
